package com.ling.simul.constant;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

/***
 * 配置常量类
 * @author cc
 * @date 2019-01-17
 *
 */
@ApiModel(description = "配置常量类")
public class CommonConstant {

    // 接口状态码
    @ApiModelProperty("失败状态")
    public static final Integer FAULT_STATUS = 2002;
    @ApiModelProperty("成功状态")
    public static final Integer SUCCESS_STATUS = 2000;

    public static final List<String> SHIFT_ORDER = Arrays.asList("甲", "乙", "丙", "丁");

    // 数据中心接口固定字段
    public static final String DATA_CENTER_SENDER = "sender";
    public static final String DATA_CENTER_ACTION = "interface";
    public static final String DATA_CENTER_OPERATOR = "wyc";
    public static final String DATA_CENTER_TERMINAL = "FM_01";
    public static final String DATA_CENTER_LINE_HSM = "hsm";// 热轧产线
    public static final String DATA_CENTER_LINE_CSM = "csm";// 酸轧产线
    public static final String DATA_CENTER_LINE_CAL = "cal";// 连退产线
    public static final Boolean DATA_CENTER_RECORD = Boolean.FALSE;// 是否打印日志 默认打印

    // mongodb字符
    public static final String MDB_CHAR_GT = "$gt"; // 大于
    public static final String MDB_CHAR_LT = "$lt"; // 小于
    public static final String MDB_CHAR_GTE = "$gte"; // 大于等于
    public static final String MDB_CHAR_LTE = "$lte"; // 小于等于
    public static final String MDB_CHAR_EQ = "$eq"; // 等于
    public static final String MDB_CHAR_NE = "$ne"; // 不等于
    public static final String MDB_CHAR_IN  = "$in"; // in
    public static final String MDB_CHAR_REGEX  = "$regex"; // in
    public static final String MDB_CHAR_NIN = "$nin"; // not in
    public static final String MDB_CHAR_MOD = "$mod"; // 取模运算
    public static final String MDB_CHAR_ALL = "$all"; // 匹配条件内所有的值
    public static final String MDB_CHAR_SIZE = "$size"; // 元素的数量
    public static final String MDB_CHAR_EXISTS = "$exists"; // 用来判断一个元素是否存在
    public static final String MDB_CHAR_TYPE = "$type"; // 基于 bson type来匹配一个元素的类型，像是按照类型ID来匹配，不过我没找到bson类型和id对照表
    public static final String MDB_CHAR_REG = ""; // 正则表达式
    public static final String MDB_CHAR_ELEMMATCH = "$elemMatch"; // 匹配内数组内的元素
    public static final String MDB_CHAR_FINDONE = ""; // 查询嵌入对象的值
    public static final String MDB_CHAR_NOT = "$not"; // 取反

    public static final HashMap<Integer, String> MONTH_ADDR = new HashMap<Integer, String>() {{
        put(1, "Jan");
        put(2, "Feb");
        put(3, "Mar");
        put(4, "Apr");
        put(5, "May");
        put(6, "Jun");
        put(7, "Jul");
        put(8, "Aug");
        put(9, "Sep");
        put(10, "Oct");
        put(11, "Nov");
        put(12, "Dec");
    }};


}
